package main

import (
	"fmt"
	"time"
)

const NUM int = 20

func main() {
	start := time.Now() //just to calculate execution time
	N := 1
	i := 0
	for i = 2; i <= NUM; i++ {
		if N%i == 0 {
			continue
		} else {
			switch {
			case i%2 == 0:
				N *= 2
			case i%3 == 0:
				N *= 3
			case i%5 == 0:
				N *= 5
			default:
				N = N * i //in case of prime
			}
			fmt.Println("N = ", N)
		}

	}
	fmt.Printf("Smallest positive number divisible by all numbers from 1 to %v: %v\n", NUM, N)
	stop := time.Now() //just to calculate execution time
	fmt.Println("Execution time: ", stop.Sub(start))
}
